package com.woniuxy.store.client;

import com.woniuxy.store.client.param.orderParam.*;
import common.WoniuPage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;
import result.Result;

import java.util.Date;
import java.util.List;

@FeignClient(contextId = "orderClient",name="store",path="/store/order")
public interface OrderClient {
    @DeleteMapping("/reduceFood")
    public Result reduceFood(@RequestParam("itemId") Integer itemId, @RequestParam("skuCount") Integer skuCount);

    @GetMapping("/pay/{payOrderNum}")
    public void pay(@PathVariable("payOrderNum")String payOrderNum) throws Exception;
    @GetMapping("/queryStoreOrder")
    public Result queryStoreOrder(@RequestParam("tableId") Integer tableId);
    @GetMapping("/storeQueryStoreOrder")
    public Result storeQueryStoreOrder(@RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize);

    @GetMapping("/roleStoreQuerySalesReport")
    public Result roleStoreQuerySalesReport(@SpringQueryMap RoleStoreQuerySalesReportParams roleStoreQuerySalesReportParams);
    @GetMapping("/roleStoreQueryTableReport")
    public Result roleStoreQueryTableReport(@SpringQueryMap RoleStoreQueryTableReportParams roleStoreQueryTableReportParams);
    @GetMapping("/roleStoreQueryFoodReport")
    public Result roleStoreQueryFoodReport(@SpringQueryMap RoleStoreQueryFoodReportParams roleStoreQueryFoodReportParams);

    @PostMapping ("/payOff")
    public Result payOff(@RequestBody PayOffParams payOffParams) throws Exception;

    @GetMapping("/queryPayOrder")
    public Result queryPayOrder();

    @PutMapping("/orderItemDingOut")
    public Result orderItemDingOut(@RequestParam("itemId")Integer itemId,@RequestParam("skuId")Integer skuId,@RequestParam("tableId")Integer tableId);
}
